# -*- coding: utf-8 -*-
"""
Created on Tue May 21 17:49:58 2024

@author: 29865
"""

import pandas as pd  
  
# 创建一个简单的DataFrame  
data = {'A': [1, 2, 3, 4, 5],  
        'B': [2, 3, 4, 5, 6],  
        'C': [5, 4, 3, 2, 1]}  
df = pd.DataFrame(data)  
  
# 计算列之间的相关系数  
correlation_matrix = df.corr()  
  
print(correlation_matrix)